package xmlParser;

import java.util.ArrayList;
import java.util.HashMap;

import ecologylab.generic.HashMapArrayList;
import ecologylab.xml.ElementState;
import ecologylab.xml.xml_inherit;
import ecologylab.xml.types.element.ArrayListState;

@xml_inherit
public class Record extends ElementState
{
	@xml_collection("field") ArrayList<ColField> fields = new ArrayList<ColField>();
//	@xml_nested	ArrayListState<ColField> fields = new ArrayListState<ColField>();
//	@xml_map("ResultSet") HashMapArrayList<String, String> fields = new HashMapArrayList<String, String>();
//	@xml_map("ResultSet") HashMap<String, String> fields = new HashMap<String, String>();
	
//	@xml_map("col_field") 
//	public HashMapArrayList<String, ColField> fields=  new HashMapArrayList<String, ColField>();
	public Record()
	{
		// TODO Auto-generated constructor stub
	}
	
	public void addField(ColField colField)
	{
		fields.add(colField);
//		fields.put(colField.getName(),colField);
	}

	public ArrayList<ColField> getFields() {
		return fields;
	}

	public void setFields(ArrayList<ColField> fields) {
		this.fields = fields;
	}
	
//	public void addField(String name, String value)
//	{
//		fields.put(name, value);
//	}
	
}
